<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
    <div class="aside">
        
         <div class="mod">
        	<div class="body">
                <div class="well">
                    <h3>联系方式</h3>
                    公司名称：{$c['companyname']}<br/>
                    联系人：{$c['linkman']}<br/>
                    联系电话：{magic_image($c['telephone'])}<br/>
                    电子邮箱：{magic_image($c['email'])}<br/>
                    公司类型：{$c['genre']}<br/>
                    地　址：{$c['address']}<br/>          
                    公司网站：<a href="{url("?module=yellowpage&userid=$c[userid]")}">{url("?module=yellowpage&userid=$c[userid]")}</a><br/>
                    <a class="button" href="{url("?module=yellowpage&userid=$c[userid]")}">查看公司详情</a>
                    <a class="button" href="{$SETTING[siteurl]}yellowpage/collect.php?userid={$rs[userid]}&title={$rs[title]}&callback_js=callback_js&referer={urlencode(URL)}">收藏此信息</a>
                    <br/>
                    <img src="{$c['logo']}" alt="公司标志" width="240"/>
                </div>
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">职位分类列表</div>
            <div class="body">
            	<table width="222" border="0" cellspacing="0" cellpadding="0" class="table_list">
                {get sql="SELECT count(*) AS number,j.station,t.name FROM table_yellowpage_job j,table_type t WHERE t.typeid = j.station AND j.status = '99' GROUP BY station ORDER BY t.listorder DESC"}
                    <tr>
                    <td><a href="{job_url(0,$r['station'],0)}">{$r['name']}</a>（{$r['number']}）</td>
                    </tr>
                {/get}  
                </table>
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">最新更新简历</div>
            <div class="body">
            	<ul>
                    {get sql="SELECT truename,applyid,specialty FROM `table_yellowpage_apply` WHERE status = '3' ORDER BY edittime DESC" rows="15"}
                        <li><a href="yp/apply.php?applyid={$r['applyid']}">{$r['truename']}</a> {$r['specialty']}</li>
                    {/get}
                  </ul>
            </div>
        </div>
        
         
        
    </div>
    
    <div class="main">
    
    
    	<ul class="breadcrumb">
          <li><a href="#">首页</a> <span class="divider">/</span></li>
          <li><a href="#">企业黄页</a> <span class="divider">/</span></li>
          <li><a href="#">企业招聘</a> <span class="divider">/</span></li>
          <li class="active">职位信息</li>
        </ul>
        
        <div class="mod">
        	<div class="head">{$rs['title']}{if ($rs['updatetime']+3600*24*$rs['period'] < time())} [ 已过期 ]{/if}</div>
        	<div class="body">{$rs['content']}</div>
        </div>
        
        
        {if $rs[userid] == $_userid || $_userid == 1}
            <a href="{url("?module=$module&file=$file&action=edit&id=$id")}" class="button"><i class="icon-edit"></i>修改</a>
            <a href="javascript:if(confirm('确定要删除吗？')) location='?module={$module}&file={$file}&action=delete&id={$id}'" class="button button-danger"><i class="icon-remove icon-white"></i>删除</a>
        {/if}
        <a class="button" href="javascript:void(0)" onClick="javascript:postapply({$jobid});">立即申请</a>
        <a class="button" href="javascript:void(0)" onClick="javascript:favorapply({$jobid});">收藏职位</a>
      
        
        
        <table cellpadding="0" cellspacing="1" width="700" class="table">
        <tr>
          <th>招聘人数</th>
          <td>{intval($rs['employ'])}人</td>
          <th>工作性质</th>
          <td>{$rs['worktype']}</td>
        </tr>
        <tr>
          <th>性别要求</th>
          <td>{$rs['sex']}</td>
          <th>学历要求</th>
          <td>{$rs['degree']}</td>
        </tr>
        <tr>
          <th>薪资</th>
          <td>{if $rs['pay']}{$rs['pay']}元/月{else}面议{/if}</td>
          <th>工作地点</th>
          <td>{$rs['workplace']}</td>
        </tr>
		<tr>
          <th>发布时间</th>
          <td>{date("Y.m.d",$rs['inputtime'])}</td>
          <th>有效期</th>
          <td>{if $rs['period']}{$rs['period']}天{else}长期有效{/if}</td>
        </tr>
      </table>
  
  
  </div>
</div>



<script type="text/javascript">
var postapply =  function(jobid)
{
	$.get("{$M[url]}myjob.php",{'action':'postapply','jobid':jobid,'ran':Math.random()},function(data){if(data == '-2')alert('非法参数');else if(data == "-1")alert('请先建立您的简历');else if(data == "1")alert("简历投递成功");else if(data == '0') alert("您已经申请过这个职位了");else if(data == '-3') alert("这个职位已经过期了");else{alert('请您先登录');$(":text[name='username']").select();}});
}

var favorapply =  function(jobid)
{
	$.get("{$M[url]}myjob.php",{'action':'favorapply','jobid':jobid,'ran':Math.random()},function(data){if(data == '-2')alert('非法参数');else if(data == "-1")alert('请先建立您的简历');else if(data == "1")alert("职位收藏成功");else if(data == '0')  alert("您已经收藏过这个职位了");else{alert('请您先登录');$(":text[name='username']").select();}});
}
</script>
{template 'footer.html'}
